package com.fhz.loginmvvm.viewmodel

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.fhz.loginmvvm.datasource.MainLocalDataSource
import com.fhz.loginmvvm.datasource.MainRemoteDataSource
import com.fhz.loginmvvm.repository.MainRepository

/**
 * 时间:2023/3/24
 * @author Mr.Feng
 * 简述: TODO
 */
class MainViewModelFactory : ViewModelProvider.Factory{
    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        return MainViewModel(MainRepository(MainRemoteDataSource(),MainLocalDataSource())) as T
    }
}